package com.keepsport.keepsportapi.service.impl;

import com.keepsport.keepsportapi.dao.UserPageDao;
import com.keepsport.keepsportapi.dto.UserSelectDto;
import com.keepsport.keepsportapi.service.intf.UserPageService;
import com.keepsport.keepsportapi.vo.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/***
 *
 *
 *                                                    __----~~~~~~~~~~~------___
 *                                   .  .   ~~//====......          __--~ ~~
 *                   -.            \_|//     |||\\  ~~~~~~::::... /~
 *                ___-==_       _-~o~  \/    |||  \\            _/~~-
 *        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *  .~       .~       |   \\ -_    /  /-   /   ||      \   /
 * /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 * |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *          '         ~-|      /|    |-~\~~       __--~~
 *                      |-~~-_/ |    |   ~\_   _-~            /\
 *                           /  \     \__   \/~                \__
 *                       _--~ _/ | .-~~____--~-/                  ~~==.
 *                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                 -_     ~\      ~~---l__i__i__i--~~_/
 *                                 _-~-__   ~)  \--______________--~~
 *                               //.-~~~-~_--~- |-------~~~~~~~~
 *                                      //.-~~~--\
 *                               神兽保佑
 *                              代码无BUG!
 *
 @Author YK
 @create 2022/7/2 19:09
 */
@Service
public class UserPageServiceImpl implements UserPageService {
    @Resource
    private UserPageDao dao;
    @Override
    public R selectAll(int token) {
        if (token>0) {
            UserSelectDto userSelectDto = dao.selectAll(token);
            if (userSelectDto!= null) {
                return R.ok(userSelectDto);
            }
        }
        return R.fail();
    }
}
